package com.lcxsoft.cartservice.service;

import com.lcxsoft.cartservice.entity.Cart;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lcxsoft.cartservice.mapper.CartMapper;
import com.lcxsoft.cartservice.query.CartAddQuery;
import com.lcxsoft.commonutils.R;
import com.lcxsoft.feign.clients.GoodsClient;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lcx
 * @since 2022-01-21
 */
public interface CartService extends IService<Cart> {

    //添加到用户的购物车
    R addToCartByUserId(CartAddQuery query, HttpServletRequest request);

    //根据用户ID查询购物车列表
    R findCartList(HttpServletRequest request);

    R decreaseCartAmount(String cartId);
}
